From: Brion Vibber Date: Wed, 18 Dec 2019 22:34:45 +0000 (-0800) Subject: Fix for screenshots when pictures path is unavailable X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~387 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f9652aab82fbb3f9ef8cde3dce84f0e35510e250;p=gnome-shell.git Fix for screenshots when pictures path is unavailable On my local jhbuild setup some local stuff is not set up and there's no pictures folder. This fixes a regression where it blew up instead of saving to the home dir in this situation. Part-of: --- diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index 8a92c6213..f10c68f38 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -84,7 +84,7 @@ var ScreenshotService = class { let path = [ GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_PICTURES), GLib.get_home_dir(), - ].find(p => GLib.file_test(p, GLib.FileTest.EXISTS)); + ].find(p => p && GLib.file_test(p, GLib.FileTest.EXISTS)); if (!path) return null;